#include <stdio.h>
#include <stdlib.h>
#include "disp.h"
#include "data.h"
#include "control.h"

int main()
{
    initStdHandle();
    initWindows();


    dispDrawGameBackground();
    dispDrawGameCenter();
    dispDrawScore(0);
    dispDrawGrade(0);
    dispDrawDefaultInfo();




    int ch;


    while(1){

        ch=  _getch();


         if(ch=='w'||ch=='W'||ch=='a'||ch=='A'||ch=='s'||ch=='S'||ch=='d'||ch=='D'||ch=='p'||ch=='P'){
            switch(state){
            case PLAY:
                controlDoPlay(ch);
                break;
            case PAUSE:
                controlDoPause(ch);
                break;
            case STOP:
                controlDoStop(ch);
                break;

            }
         }


    }
    return 0;
}
